<form id="pagerForm" action="__URL__" method="get">   <!-- action="#rel#" -->
    <input type="hidden" name="p" value="1" />
    <input type="hidden" name="numPerPage" value="{$numPerPage}" />
    <input type="hidden" name="orderField" value="{$orderField}" />
    <input type="hidden" name="orderDirection" value="{$param.orderDirection}" />
</form>


<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <if condition="in_array('insert', $privilegelist)">
                <li><a class="add" href="__URL__/add" rel="adminadd" target="dialog"><span>添加</span></a></li>
                <li class="line">line</li>
            </if>
            <if condition="in_array('delete', $privilegelist)">
                <li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="ids" href="__URL__/delAll" postType="string" class="delete"><span>批量删除</span></a></li>
                <li class="line">line</li>
            </if>
            <if condition="in_array('edit', $privilegelist)">
                <li><a class="edit" href="__URL__/edit/id/{auth_id}" rel="adminauthedit" target="dialog" warn="请选择一条记录"><span>修改</span></a></li>
            </if>
        </ul>
    </div>


    <table class="table" width="100%" layoutH="75">
        <thead>

            <tr>
            <if condition="in_array('delete', $privilegelist)">
            <th>
                <input type="checkbox" group="ids" class="checkboxCtrl" />
            </th>
            </if>
            <th>模块标题</th>
            <th>模块</th>
            <th>功能</th>
            <th>排序</th>
            <th>操作</th>
            </tr>
        </thead>
        <tbody>
        

        <volist name="list" id="auth"  empty="权限模块为空，请添加">
            <tr rel="{$auth.auth_id}" target="auth_id">
                <if condition="in_array('delete', $privilegelist)">
                <td>
                    <input name="ids" value="{$auth.auth_id}" type="checkbox"/>
                </td>
                </if>
                <td>
                        <a href="javascript:void(0);" title="点击查看子级" onclick="$('tr[name^=chird_]').hide();$('tr[name=chird_{$auth.auth_id}]').show(100);">{$auth.title}</a>
                    </td>
                    <td>
                        {$auth.controller}
                    </td>
                    <td>
                        {$auth.action}
                    </td>
                    <td>
                        {$auth.sortNum}
                    </td>
                <td>
                    
                    <if condition="in_array('edit', $privilegelist)">
                    <a href="__URL__/edit/id/{$auth.auth_id}" target="dialog" class="btnEdit" rel="编辑">编辑</a>
                    </if>
                   
                    <if condition="in_array('delete', $privilegelist)">
 						<a title="删除" target="ajaxTodo" href="__URL__/delete/id/{$auth.auth_id}" class="btnDel">删除</a> 
                    </if>
                </td>
            </tr>
            
            <volist name="auth.chird" id="chird" key="k">
                <tr  rel="{$chird.auth_id}" target="auth_id" class="{$chird.auth_id}" name="chird_{$auth.auth_id}" style="display:none;">
                    <if condition="in_array('delete', $privilegelist)">
                        <td>
                            <input name="ids" value="{$chird.auth_id}" type="checkbox"/>
                        </td>
                    </if>
                    <td>
                        >>> {$chird.title}
                    </td>
                    <td>
                        {$chird.controller}
                    </td>
                    <td>
                        {$chird.action}
                    </td>
                    <td>
                        {$chird.sortNum}
                    </td>
                    <td>
                    
                        <if condition="in_array('edit', $privilegelist)">
                        <a title="编辑" target="dialog" href="__URL__/edit/id/{$chird.auth_id}" class="btnEdit">编辑</a>
                        </if>
                        <if condition="in_array('delete', $privilegelist)">
                            <a title="删除" target="ajaxTodo" href="__URL__/delete/id/{$chird.auth_id}" class="btnDel">删除</a>
                        </if>
                	</td>
                
                
                </tr>
                </volist>
            </volist>
                </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                <option value="20" <?php echo $numPerPage == 20 ? 'selected="true"' : '' ; ?> >20</option>
                <option value="50" <?php echo $numPerPage == 50 ? 'selected="true"' : '' ; ?>>50</option>
                <option value="100" <?php echo $numPerPage == 100 ? 'selected="true"' : '' ; ?> >100</option>
                <option value="200" <?php echo $numPerPage == 200 ? 'selected="true"' : '' ; ?> >200</option>
            </select>
            <span>条，共{$totalCount}条</span>
        </div>

        <div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="10" currentPage="{$currentPage}"></div>

    </div>
</div>
